import axios from "axios";

const axiosInstance = axios.create(
  {
    //基地址
    baseURL : 'http://pcapi-xiaotuxian-front-devtest.itheima.net',
    //超时时间
    timeout: 5000
  }
);

//axios 拦截器
axiosInstance.interceptors.request.use(config => {
  return config;
}, e => Promise.reject(e));

axiosInstance.interceptors.response.use(config => {
  return config;
}, e => Promise.reject(e));

//暴漏实例
export default axiosInstance;
